#ifndef DINGDANIMPORTWIDGET_H
#define DINGDANIMPORTWIDGET_H

#include <QDialog>
#include "dingdan.h"
#include "dingdanpickerstandarditemmodel.h"
#include "dingdanexchangewidget.h"
#include "dingdanservice.h"

namespace Ui {
class DingdanImportWidget;
}

class DingdanImportWidget : public QDialog
{
    Q_OBJECT

public:
    explicit DingdanImportWidget(QWidget *parent = nullptr);
    ~DingdanImportWidget();

    void setWidgetType(Dingdan::DingdanType widgetType);

    void setDingdansState(Dingdan::DingdanState state);

    void showAndInit();

signals:
    void importDingdanSuccess(Dingdan *dingdan);

private:
    Ui::DingdanImportWidget *ui;
    DingdanPickerStandardItemModel *model;
    DingdanExchangeWidget dingdanExchangeWidget;

    Dingdan::DingdanType widgetType;
    Dingdan::DingdanState state;

    DingdanService dingdanService;
};

#endif // DINGDANIMPORTWIDGET_H
